<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>创建校长</title>
    <link rel="stylesheet" type="text/css" href="../plugin/layui/css/layui.css" />
    <script src="../plugin/layui/layui.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
    <div id="app">
        <div>
            <button type="button" class="layui-btn layui-btn-normal layui-btn-lg" id="create">创建</button>
        </div>
        <div>
            <table id="leader" lay-filter="leader"></table>
        </div>
    </div>
    <script>
        layui.use(['table','jquery','layer'], function(){
            var table = layui.table,$=layui.jquery,layer=layui.layer;
            $("#create").click(function () {
                layer.open({
                    type:2,
                    area:['700px','450px'],
                    title:'校长基本信息',
                    content:'createleader.html',
                });
            })

            //第一个实例
            table.render({
                elem: '#leader'
                ,height: 312
                ,url: '../leader/all' //数据接口
                ,page: true //开启分页
                ,limit:3
                ,limits:[3,6,9,12]
                ,cols: [[ //表头
                    {field: 'lname', title: '名字', width:100, sort: false, fixed: 'left'}
                    ,{field: 'sname', title: '负责学校', width:200}
                    ,{field: 'phone', title: '手机号', width:200}
                    ,{field: 'graduate', title: '毕业院校', width:200}
                    ,{field: 'graduateTime', title: '毕业时间', width:150}
                    ,{field: 'workHistory', title: '工作经历', width:400}
                    ,{field: 'birthday', title: '出生年月', width:150}
                    ,{field: 'gender', title: '性别', width:50}
                ]]
            });
        });
    </script>
</body>
</html>